<?php
//Check mail Information: Method(Text/plain or text/html),
	include("changeinfo.php");
	$nb = number_format($pdoanhso);
	$nli = nl2br($infotop);
	$nlc = nl2br($comment);
	$body = "Hi, $adder<br><br>
			<table>
			<tr><td>Bạn nhận được email này từ Data center | Security services, dưới đây là các thông tin về dự án
			được ghi nhận:<br><br>
			
			1. THÔNG TIN DỰ ÁN</b><br><br>
			<table>
			<tr><td>Tên doanh nghiệp </td><td> $ctname</td></tr>
				<tr><td>Số điện thoại</td><td> $ctphone</td></tr>
				<tr><td>PKTT </td><td>$pk</td></tr>
				<tr><td>KT </td><td>$custype</td></tr>
				<tr><td><b>Status </td><td>$ptc</b></td></tr>
				<tr><td><b>Services </td><td>pentest ($pentest), audit ($audit), ddos ($ddos), train ($train)</td></tr>
				<tr><td>Doanh số </td><td> $nb</td></tr>
				<tr><td>Assign to </td><td> $assignto</td></tr>
			</table>
			
			+++++++++++++++++++++++++++++++++<br>
			2. THÔNG TIN LIÊN LẠC<br><br>
			<table>
			<tr><td>Tên người liên hệ: </td><td> $nMan</td></tr>
			<tr><td>Số điện thoại: </td><td> $pMan</td></tr>
			<tr><td>Email: </td><td> $eMan</td></tr>
			</table>
			
			+++++++++++++++++++++++++++++++++<br>
			3. PHÂN TÍCH ĐÁNH GIÁ <br><br>
			* Thông tin chính: $nli<br>
			* Phân tích/đánh giá: $nlc <br><br>
			
			Regards,<br>
			Data Center | CMC InfoSec<br>
			Sent on $start_time (Vietnam Time)<br>
			<br><br>";
	
	//Mail Sent information
	require("class.phpmailer.php");
	$mailer = new PHPMailer();
	$mailer->IsMail();
	$mailer->IsSMTP();
	$mailer->Host = 'ssl://smtp.googlemail.com:465';
	$mailer->SMTPAuth = TRUE;
	$mailer->Username = 'alexy@cmclab.net';  // Change this to your gmail adress
	$mailer->Password = 'fuckingtodie';  // Change this to your gmail password
	$mailer->From = 'alexy@cmclab.net';  // This HAVE TO be your gmail adress
	$mailer->FromName = 'Data center | Security Services'; // This is the from name in the email, you can put anything you like here
	$mailer->IsHTML(true);  //True: Gui bang Text/html, False: Gui bang Text/plain
	$mailer->Body = $body;
	$mailer->Subject = 'Data Center | New project started';
	$mailer->AddAddress('binhlva@cmcinfosec.com','Luong Vu An Binh | CMC InfoSec');
	$mailer->AddAddress('ttduc@cmcinfosec.com','Trieu Tran Duc | CEO');
		if ($adder == huyenntt) { $mailer->AddAddress('huyenntt@cmcinfosec.com','Nguyen Thi Thu Huyen');}
		if ($adder == phuonght) { $mailer->AddAddress('phuonght@cmcinfosec.com','Ha The Phuong');}
		if ($adder == duongdh) { $mailer->AddAddress('duongdh@cmcinfosec.com','Do Dai Duong');}
		if ($adder == haint) { $mailer->AddAddress('haint@cmcinfosec.com','Nguyen Thanh Hai');}
		if ($assignto == huyenntt) { $mailer->AddAddress('huyenntt@cmcinfosec.com','Nguyen Thi Thu Huyen');}
		if ($assignto == phuonght) { $mailer->AddAddress('phuonght@cmcinfosec.com','Ha The Phuong');}
		if ($assignto == duongdh) { $mailer->AddAddress('duongdh@cmcinfosec.com','Do Dai Duong');}
		if ($assignto == haint) { $mailer->AddAddress('haint@cmcinfosec.com','Nguyen Thanh Hai');}
		if ($assignto == ttduc) { $mailer->AddAddress('ttduc@cmcinfosec.com','Trieu Tran Duc | CEO');}
	$seMail = $senderMail;
	$mailer->AddAddress($seMail);
	
	if(!$mailer->Send())
		{echo "Message was not sent<br/ >";echo "Mailer Error: " . $mailer->ErrorInfo;}
		else{echo " Message has been sent";}
?>